:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background: #f5f6fa;
    --card-bg: #ffffff;
}

* {
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background: var(--background);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid #dfe6e9;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s;
    background: var(--card-bg);
}

.search-input:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #636e72;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 10px;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-content {
    padding: 20px;
    flex: 1;
}

.card-title {
    font-size: 1.2rem;
    margin: 0 0 12px;
    color: var(--primary-color);
    font-weight: 600;
}

.card-brief {
    color: #636e72;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    border-top: 1px solid #eee;
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f8f9fa;
}

.action-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #636e72;
    transition: all 0.2s;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #636e72;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .card-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 确保操作按钮可见 */
.card-actions {
    opacity: 0.9;
    transition: opacity 0.3s;
}

.card:hover .card-actions {
    opacity: 1;
}

.action-btn {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* 欢迎标题样式 */
.admin-welcome {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 2.5rem;
    color: #2c3e50;
    text-align: center;
    margin: 2rem 0;
    position: relative;
    padding-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.admin-welcome::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, #3498db 0%, #9b59b6 100%);
    border-radius: 2px;
}

/* 按钮容器样式 */
.button-container {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 10px; /* 按钮之间的间距 */
    align-items: center;
}

/* 退出按钮样式 */
#logoutButton {
    background: #ffffff;
    color: #e74c3c;
    padding: 10px 25px;
    border: 2px solid #e74c3c;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

#logoutButton:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

#logoutButton::before {
    content: '\f2f5'; /* FontAwesome logout图标 */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* 管理用户按钮样式 */
#usermanageButton {
    background: #ffffff;
    color: powderblue;
    padding: 10px 25px;
    border: 2px solid deepskyblue;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

#usermanageButton:hover {
    background: deepskyblue;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.3);
}

#usermanageButton::before {
    content: '\f0c0'; /* FontAwesome 用户图标 */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* 管理博文标题样式 */
.header-bar h1 {
    font-size: 1.8rem;
    color: #34495e;
    position: relative;
    padding-left: 40px;
    margin-bottom: 1.5rem !important;
}